<html>
<head><meta charset="utf-8"><title>general edition work · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html">general edition work</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="133957613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133957613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133957613">(Sep 14 2018 at 14:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> so I noticed this the other day <a href="https://github.com/rust-lang/rust/issues/54230" target="_blank" title="https://github.com/rust-lang/rust/issues/54230">https://github.com/rust-lang/rust/issues/54230</a> and I was thinking this would be a nice thing to do for the 2018 release to help people transition</p>



<a name="133957617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133957617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133957617">(Sep 14 2018 at 14:49)</a>:</h4>
<p>I'm not sure if there's another issue about it</p>



<a name="133957626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133957626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133957626">(Sep 14 2018 at 14:49)</a>:</h4>
<p>anyway, thought you might enjoy it if you are looking for something different</p>



<a name="133957926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133957926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133957926">(Sep 14 2018 at 14:53)</a>:</h4>
<p>Sounds good, I'll assign and take a look.</p>



<a name="133957956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133957956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133957956">(Sep 14 2018 at 14:54)</a>:</h4>
<p>if we don't want to be <em>too</em> smart, this is real easy</p>



<a name="133958005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133958005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133958005">(Sep 14 2018 at 14:54)</a>:</h4>
<p>I guess that .. ideally .. we might also compare against possible crate names?</p>



<a name="133958024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133958024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133958024">(Sep 14 2018 at 14:54)</a>:</h4>
<p>well, best thing seems like it would be to compare against names in the root + possible crate names, but the former might be tricky to enumerate; we probably don't have a "complete" list at the time. But we could get an "incomplete" list relatively easily</p>



<a name="133958044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133958044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133958044">(Sep 14 2018 at 14:55)</a>:</h4>
<p>should probably ping <span class="user-mention" data-user-id="119009">@eddyb</span> or <span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> for thoughts</p>



<a name="133958146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133958146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133958146">(Sep 14 2018 at 14:56)</a>:</h4>
<p>(done)</p>



<a name="133960333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960333">(Sep 14 2018 at 15:22)</a>:</h4>
<p>wait, what list of crates?</p>



<a name="133960364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960364">(Sep 14 2018 at 15:23)</a>:</h4>
<p>from the prelude?</p>



<a name="133960405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960405">(Sep 14 2018 at 15:23)</a>:</h4>
<p>one thing that I'm not sure everyone's on board with: migration code should remove "extern crate" only when redundant with extern_prelude crates</p>



<a name="133960423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960423">(Sep 14 2018 at 15:24)</a>:</h4>
<p>if we see <code>use foo::bar::baz</code>  and <code>foo</code> is not valid, we should try to help the user find things they might have meant, is what I am saying. I am particularly interested in the case of helping people overcome 2015 "muscle memory", but it's probably good to also help people by suggesting crates.</p>



<a name="133960470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960470">(Sep 14 2018 at 15:24)</a>:</h4>
<blockquote>
<p>one thing that I'm not sure everyone's on board with: migration code should remove "extern crate" only when redundant with extern_prelude crates</p>
</blockquote>
<p>define "redundant"?</p>



<a name="133960474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960474">(Sep 14 2018 at 15:24)</a>:</h4>
<p>I think I'm on board with that...</p>



<a name="133960487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960487">(Sep 14 2018 at 15:24)</a>:</h4>
<p>there are some weird cases where you could re-write to <code>use crate_name;</code> I guess</p>



<a name="133960514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960514">(Sep 14 2018 at 15:25)</a>:</h4>
<p>I mean, you can't remove extern crate rustc</p>



<a name="133960525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960525">(Sep 14 2018 at 15:25)</a>:</h4>
<p>but you can remove extern crate cargodep</p>



<a name="133960529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960529">(Sep 14 2018 at 15:25)</a>:</h4>
<p>yes ok</p>



<a name="133960575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960575">(Sep 14 2018 at 15:26)</a>:</h4>
<p>we're too aggressive now in other words, because we don't check that</p>



<a name="133960580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960580">(Sep 14 2018 at 15:26)</a>:</h4>
<p>(seems right)</p>



<a name="133960654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/133960654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#133960654">(Sep 14 2018 at 15:27)</a>:</h4>
<p>well, <em>if</em> we don't check that. idk</p>



<a name="134064642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134064642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134064642">(Sep 16 2018 at 19:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I <a href="https://github.com/rust-lang/rust/issues/54230#issuecomment-421814679" target="_blank" title="https://github.com/rust-lang/rust/issues/54230#issuecomment-421814679">added a comment to the issue</a>: at some point the error has changed and it does now make a suggestion. Is this still something we want to look at?</p>



<a name="134107363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107363">(Sep 17 2018 at 15:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> not sure if I was ambigious in the comment: that error was changed without my doing anything - some other PR landed it. So I'm not sure how much there is to do for that issue anymore.</p>



<a name="134107484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107484">(Sep 17 2018 at 15:23)</a>:</h4>
<p>I don't think it's a very good suggestion</p>



<a name="134107487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107487">(Sep 17 2018 at 15:23)</a>:</h4>
<p>(personally)</p>



<a name="134107501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107501">(Sep 17 2018 at 15:23)</a>:</h4>
<p>but it's not <em>wrong</em></p>



<a name="134107552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107552">(Sep 17 2018 at 15:24)</a>:</h4>
<p>that said</p>



<a name="134107558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107558">(Sep 17 2018 at 15:24)</a>:</h4>
<p>if we modify the test slightly...</p>



<a name="134107575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107575">(Sep 17 2018 at 15:24)</a>:</h4>
<p>If there are improvements you'd like to see made then I can still work on doing that. I just noticed that the error had changed while I was digging around at the weekend and wasn't sure if there was still work to be done as a result.</p>



<a name="134107595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107595">(Sep 17 2018 at 15:25)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/54230#issuecomment-422060771" target="_blank" title="https://github.com/rust-lang/rust/issues/54230#issuecomment-422060771">left a comment</a></p>



<a name="134107604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107604">(Sep 17 2018 at 15:25)</a>:</h4>
<p>yeah, the exact thing to do is a bit unclear</p>



<a name="134107685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107685">(Sep 17 2018 at 15:26)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0432]: unresolved import `foo`
  --&gt; src/test/ui/rust-2018/local-path-suggestions.rs:18:9
   |
18 |     use foo::Bar;
   |         ^^^ Could not find `foo` in `{{root}}`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
</pre></div>



<a name="134107695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107695">(Sep 17 2018 at 15:26)</a>:</h4>
<p>I guess I can work on improving the above.</p>



<a name="134107720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134107720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134107720">(Sep 17 2018 at 15:26)</a>:</h4>
<p>(that's from the example in the comment you left)</p>



<a name="134108032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108032">(Sep 17 2018 at 15:32)</a>:</h4>
<p>that's what I would expect, yes</p>



<a name="134108040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108040">(Sep 17 2018 at 15:32)</a>:</h4>
<p>the other case I would like to see improved is something like <code>use tsd::foo</code></p>



<a name="134108043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108043">(Sep 17 2018 at 15:32)</a>:</h4>
<p>which would ideally suggest <code>std</code></p>



<a name="134108044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108044">(Sep 17 2018 at 15:32)</a>:</h4>
<p>(or maybe it does?)</p>



<a name="134108046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108046">(Sep 17 2018 at 15:32)</a>:</h4>
<p>this applies to <code>use foo</code> too, potentialy</p>



<a name="134108078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108078">(Sep 17 2018 at 15:33)</a>:</h4>
<p>basically I think we should look for:</p>
<ul>
<li>crates with "similar" names (and suggest that alternative)</li>
<li>modules/items in the root with "similar" names (and suggest <code>use crate::module_name</code>)</li>
</ul>
<p>but we could start by looking for modules/items in the root with an <em>exact</em> match</p>



<a name="134108079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108079">(Sep 17 2018 at 15:33)</a>:</h4>
<p>Doing <code>use tsd::path</code> doesn't suggest <code>use std::path</code>.</p>



<a name="134108084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108084">(Sep 17 2018 at 15:33)</a>:</h4>
<p>(I'm not 100% sure how to do it, though)</p>



<a name="134108094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108094">(Sep 17 2018 at 15:33)</a>:</h4>
<p>Just the same error as above with the <code>{{root}}</code>.</p>



<a name="134108098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134108098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134108098">(Sep 17 2018 at 15:34)</a>:</h4>
<p>ok</p>



<a name="134315625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/general%20edition%20work/near/134315625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/general.20edition.20work.html#134315625">(Sep 20 2018 at 15:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Submitted a PR for the above: <a href="https://github.com/rust-lang/rust/issues/54391" target="_blank" title="https://github.com/rust-lang/rust/issues/54391">#54391</a> - apologies for the delay on it, didn't find time to look at it as quickly as I'd hoped. </p>
<p>Happy to change up how it is implemented if it isn't what you had in mind - error reporting logic seems fairly scattered in the resolve crate and I wasn't sure at which point to insert the suggestions, since there were a handful of places where similar suggestions are added currently. Not sure about the <code>resolve_self_super_hint.rs</code> test case change either.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>